// API 端点常量
export const API_ENDPOINTS = {
  // 媒体文件相关
  MEDIA_FILE: {
    GET_LIST: '/api/bizMediaFile/getMediaFileList',
    DELETE: '/api/bizMediaFile/deleteVideoById',
    UPLOAD_CHUNK: '/api/bizMediaFile/uploadChunk',
    MERGE_CHUNKS: '/api/bizMediaFile/mergeChunks',
    CHECK_FILE: '/api/bizMediaFile/checkFile',
    CHECK_CHUNK: '/api/bizMediaFile/checkChunk',
  },
  // 用户相关
  USER: {
    LOGIN: '/api/loginController/login',
    GET_INFO: '/api/sysUserController/getInfo',
  },
};

// 分页默认值
export const PAGINATION = {
  DEFAULT_CURRENT: 1,
  DEFAULT_PAGE_SIZE: 10,
  PAGE_SIZES: [10, 20, 50, 100],
};

// HTTP 状态码
export const HTTP_STATUS = {
  SUCCESS: 200,
  CREATED: 201,
  NO_CONTENT: 204,
  BAD_REQUEST: 400,
  UNAUTHORIZED: 401,
  FORBIDDEN: 403,
  NOT_FOUND: 404,
  INTERNAL_SERVER_ERROR: 500,
};

// 媒体文件类型
export const MEDIA_TYPE = {
  VIDEO: 'video',
  IMAGE: 'image',
  DOCUMENT: 'document',
};

// 媒体文件类型中文映射
export const MEDIA_TYPE_LABEL = {
  [MEDIA_TYPE.VIDEO]: '视频',
  [MEDIA_TYPE.IMAGE]: '图片',
  [MEDIA_TYPE.DOCUMENT]: '文档',
};

// 正则表达式
export const REGEX = {
  EMAIL: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
  PHONE: /^1[3-9]\d{9}$/,
  URL: /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/,
};

// 存储键名
export const STORAGE_KEY = {
  TOKEN: 'token',
  UserInfo: 'userInfo',
  Theme: 'theme',
};